from sklearn.ensemble import RandomForestClassifier

from src.feature_extract import default_property_selector,make_author_attribution_dataset


source_dir='data/cpp'
model=RandomForestClassifier(random_state=0)

x,y,detail=make_author_attribution_dataset(source_dir,'cpp',property_selector=default_property_selector)

model.fit(x,y)

#print(x,y)
print(f"train: {model.score(x,y)}")
